package com.vamonossoftware.spike.spring.jws;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Client to access the web service.
 * <p/>
 * Should produce the following output:
 * <p/>
 * <pre>
 * Jul 26, 2011 6:24:56 PM com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass
 * INFO: Dynamically creating request wrapper Class com.vamonossoftware.spike.spring.jws.jaxws.GetGreeting
 * Jul 26, 2011 6:24:56 PM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass
 * INFO: Dynamically creating response wrapper bean Class com.vamonossoftware.spike.spring.jws.jaxws.GetGreetingResponse
 * hello
 *
 * Process finished with exit code 0
 * </pre>
 */
public class MainClientWebService {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("com/vamonossoftware/spike/spring/jws/spikeClientApplicationContext.xml");
        SpikeServiceEP spikeWebService = (SpikeServiceEP) context.getBean("spikeWebService");
        System.out.println(spikeWebService.getGreeting());
    }
}
